package com.crm.util;

import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.HtmlEmail;

public class SendEmail {
	
	public static void sendHtmlEmail(String title, String msg, String emailAddress) throws EmailException {
		HtmlEmail email = new HtmlEmail();
		email.setHostName("smtp.139.com");
		email.setAuthentication("weiwu1234@139.com", "Zchengjie1234");
		email.setCharset("UTF-8");
		email.setTLS(true);
		
		email.setFrom("weiwu1234@139.com");
		email.setSubject(title);
		email.setHtmlMsg(msg);
		email.addTo(emailAddress);
		email.send();
	}
}
